package com.feilo.action;

import java.util.List;
import javax.annotation.Resource;
import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.feilo.biz.LogBiz;
import com.feilo.entity.Log;
import com.feilo.util.ProReader;
import com.opensymphony.xwork2.ActionContext;
import com.zoo.pojo.Page;
@Controller
@Scope("prototype")
public class LogAction {
	@Resource
	private String msg;
	Log log;
	String ip=ServletActionContext.getRequest().getRemoteAddr();
	String addName=(String) ActionContext.getContext().getSession().get("user");
	//��ҳ��Ϣ������ȡ��pageInfo 
    private int pageNo = 1; 
    private int pageinfo = 1; 
    private Page pageInfo ;
	private String url ;
	private String skipUrl;
	private String text;
	List<Log> logs;
	public String logList(){
		LogBiz us = null;
		List<Log> list=us.getLogs();
		int pageSize = Integer.parseInt(ProReader.getInstance().getProperty("pageSize"));
		int showCount = Integer.parseInt(ProReader.getInstance().getProperty("showCount"));
		pageInfo = new Page(pageNo, pageSize,logs.size(),showCount);   
        list = logs.subList(pageInfo.getRecordStart() - 1, pageInfo.getRecordEnd());  
        url="log_logList.do";   
		return "logList";
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public int getPageNo() {
		return pageNo;
	}
	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getSkipUrl() {
		return skipUrl;
	}
	public void setSkipUrl(String skipUrl) {
		this.skipUrl = skipUrl;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public int getPageinfo() {
		return pageinfo;
	}
	public void setPageinfo(int pageinfo) {
		this.pageinfo = pageinfo;
	}

}
